<template>
  <div class="loadingData">
    <template v-if="loading">加载中.............................................................</template>
    <template v-else-if="error">错误提示：{{error?.data?.data}}</template>
    <template v-else>
      <slot />
    </template>
  </div>
</template>

<script setup>

defineProps({
  loading: {
    type: Boolean,
    default: false
  },
  error:{
    type:[String,Boolean,Symbol],
    default:false
  }
})

</script>

<style lang="scss" scoped>
  .loadingData{
    width: 100%;
    font-size: 30px;
  }
</style>